package com.mspbots.core.wise.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.mspbots.core.DefaultBaseService;
import com.mspbots.core.wise.controller.params.UserMappingParams;
import com.mspbots.core.wise.model.TenantUserMapping;
import com.mspbots.core.wise.model.dto.UserMappingCommand;
import com.mspbots.core.wise.model.dto.UserMappingDetail;
import com.mspbots.core.wise.model.dto.UserMappingResponse;

public interface TenantUserMappingService extends DefaultBaseService<TenantUserMapping> {

    /**
     * get mapping by teams user id
     *
     * @param params teams user id
     * @return com.mspbots.cw.request.TenantUserMappingDTO
     **/
    UserMappingResponse findByOne(UserMappingParams params);

    /**
     * by tenant id and  tenant user id
     *
     * @param tenantId tenant id
     * @param userId   tenant user id
     * @return
     */
    boolean existsByTenantAndUserId(Long tenantId, Long userId);

    UserMappingDetail detail(UserMappingParams params) throws JsonProcessingException;

    UserMappingCommand commandDetail(UserMappingParams params);
}
